<template>
  <el-row>
    <h3>快报快照查询</h3>
    <form-componet inline :form-label="formModelLabel1" :form-model="formModelCompnet"></form-componet>
    <form-componet inline :form-label="formModelLabel" :form-model="formModelCompnet"></form-componet>
    <el-button @click.prevent="onsubmit" type="primary">
      提交
    </el-button>
    <el-divider></el-divider>
  </el-row>
</template>

<script>
import FormComponet from "../../components/FormComponet";

export default {
  name: "KbQuery",
  components: {
    FormComponet
  },
  data() {
    return {
      formModelCompnet: {
        dateList: [],
        sndate: ""
      },
      formModelLabel: [
        {
          model: "dateList",
          type: "datePickerList",
          name: "查询日期"
        }
      ],
      formModelLabel1: [
        {
          model: "sndate",
          type: "datePicker",
          name: "快照日期"
        }
      ]
    };
  },
  methods: {
    onsubmit() {
      window.open(
        "/kbquery/dataemp?sndate=" +
          this.formModelCompnet.sndate +
          "&sdate=" +
          this.formModelCompnet.dateList[0] +
          "&edate=" +
          this.formModelCompnet.dateList[1],
        "_parent"
      );
    }
  }
};
</script>

<style scoped></style>
